From 06a8ed945b4c517bb6cf5c84f0d06aa9ede37f11 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Mon, 31 Oct 2022 20:31:03 +0100 Subject: tabbed bot page --- web/pw-server/src/routes/bots/[bot_name]/stats.svelte | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'web/pw-server/src/routes/bots/[bot_name]/stats.svelte') diff --git a/web/pw-server/src/routes/bots/[bot_name]/stats.svelte b/web/pw-server/src/routes/bots/[bot_name]/stats.svelte index 6b5a2e1..67b769f 100644 --- a/web/pw-server/src/routes/bots/[bot_name]/stats.svelte +++ b/web/pw-server/src/routes/bots/[bot_name]/stats.svelte @@ -12,11 +12,10 @@ apiClient.get("/api/leaderboard"), ]); - const { bot, owner } = botData; + const { bot } = botData; return { props: { bot, - owner, botStats, leaderboard, }, @@ -29,7 +28,7 @@ } } - function mergedStats(rawStats: object) { + function calcMergedStats(rawStats: object) { return Object.fromEntries( Object.entries(rawStats).map(([opponent, ms]) => { const mapStats = ms as { k: MatchupStats }; @@ -59,23 +58,13 @@
-
-

{bot["name"]}

- {#if owner} - - {owner["username"]} - - {/if} -
-

Stats

-- cgit v1.2.3
Rank